Skip to content

DOC: Merge FAQ and gotcha (rebase of GH13768) #15222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jorisvandenbossche
Copy link
Member

@jorisvandenbossche jorisvandenbossche commented Jan 25, 2017

Rebase and clean-up of #13768

closes #9809

@jorisvandenbossche jorisvandenbossche added this to the 0.20.0 milestone Jan 25, 2017
@jreback
Copy link
Contributor

jreback commented Jan 25, 2017

lgtm!

@codecov-io
Copy link

Current coverage is 85.98% (diff: 100%)

Merging #15222 into master will decrease coverage by <.01%

@@             master     #15222   diff @@
==========================================
  Files           140        140          
  Lines         51272      51275     +3   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          44087      44089     +2   
- Misses         7185       7186     +1   
  Partials          0          0          

Powered by Codecov. Last update 64d7670...7abb65b

@jreback
Copy link
Contributor

jreback commented Jan 25, 2017

thanks!

@jreback jreback closed this in 2619ee3 Jan 25, 2017
Copy link
Member

@shoyer shoyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jreback maybe we can leave things open for review for slightly longer next time? :)

Label-based indexing with integer axis labels is a thorny topic. It has been
discussed heavily on mailing lists and among various members of the scientific
Python community. In pandas, our general viewpoint is that labels matter more
than integer locations. Therefore, with an integer axis index *only*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove "with an integer axis index" -- I think this applies to everything.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. Originally this was a part about ix, and then this made more sense (the ix was replaced by loc after the deprecation)

I didn't really review the content of these parts, only moved them (apart from the comment that were already made on the other PR), but good to do that now as well.

s.loc['c':'e'+1]

A very common use case is to limit a time series to start and end at two
specific dates. To enable this, we made the design design to make label-based
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bad example -- it's easy to calculate a following timestamp!

(To be honest, I am no longer convinced that end inclusive indexing is a good idea. But we are stuck with it for backwards compatibility.)

Indexing potentially changes underlying Series dtype
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The different indexing operation can potentially change the dtype of a ``Series``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's clarify this is a little more:

"The different indexing operation"
->
"Indexing with Series with a list of index locations that do not exist"

Might be good to cover DataFrame dtype changes with indexing here, too, but I think it's a bit more complicated because of block consolidation.

@@ -1,18 +1,92 @@
.. currentmodule:: pandas
.. _gotchas:

********************************
Frequently Asked Questions (FAQ)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it really makes sense to call this new page "FAQ" until we rephrase the section headers as questions.

Copy link
Member Author

@jorisvandenbossche jorisvandenbossche Jan 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch, that is a leftover from the other PR. I changed everything from FAQ back to gotchas, apart from the header.

AnkurDedania pushed a commit to AnkurDedania/pandas that referenced this pull request Mar 21, 2017
Rebase and clean-up of pandas-dev#13768
closes pandas-dev#9809

Author: Joris Van den Bossche <[email protected]>
Author: sinhrks <[email protected]>

Closes pandas-dev#15222 from jorisvandenbossche/pr/13768 and squashes the following commits:

7abb65b [Joris Van den Bossche] Make 'indexing may change dtype' more general
53a6970 [Joris Van den Bossche] Move HTML libraries gotchas to html io docs
7185dd4 [Joris Van den Bossche] Keep original gotchas label for references
c9e41cc [Joris Van den Bossche] Redo updates after ix deprecation
ab7fdf0 [Joris Van den Bossche] restore file name
f5e0af0 [sinhrks] DOC: Merge FAQ and gotcha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: merge FAQ / Caveats & Gotchas
5 participants